li=[9,8,7,5,6,1,3]
'''
f=()
leng=len(li)
for f in range(0,leng-1):
    if li[f]<li[f+1]:
        temp1=li[f]
        li[f]=li[f+1]
        li[f+1]=temp1
    elif li[f]>=li[f+1]:
        pass
print(li)
'''
def insert_sor():
    for i in range(1,len(li)):
        num = li[i]
        j = i-1
        while j >=0 and li[j] > num:
            li[j+1]=li[j]
            j = j-1
        li[j+1]=num
        pass

print(li)